const User = require('./User');
const Resume = require('./resume');
const Invitation = require('./Invitation');

// 定义模型关系
User.hasMany(Invitation, { foreignKey: 'createdBy' });
Invitation.belongsTo(User, { foreignKey: 'createdBy' });

Invitation.hasMany(Resume, { foreignKey: 'invitation_id' });
Resume.belongsTo(Invitation, { foreignKey: 'invitation_id' });

module.exports = {
  User,
  Resume,
  Invitation
}; 